package com.zbu.reggie.controller;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;

@SpringBootTest
public class testUserController {
    @Autowired
    private JavaMailSender mailSender;

    @Test
    void testSendMail() {
        SimpleMailMessage message = new SimpleMailMessage();
        message.setFrom("your-email@qq.com");
        message.setTo("target@example.com");
        message.setSubject("Test");
        message.setText("Hello");
        mailSender.send(message);
    }
}
